package com.kandroid.ogles_triangledemo;

import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.kandroid.ogles_triangledemo.widgets.MyTDView;

public class MainActivity extends AppCompatActivity {
    private MyTDView mView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        mView = new MyTDView(this);
        mView.requestFocus();
        mView.setFocusableInTouchMode(true);
        setContentView(mView);
    }

    @Override
    public void onResume()
    {
        super.onResume();
        mView.onResume();
    }

    @Override
    public void onPause()
    {
        super.onPause();
        mView.onPause();
    }
}
